<div class="form">
<?php /** @var BootActiveForm $form */
$form = $this->beginWidget('bootstrap.widgets.TbActiveForm', array(
    'id'=>'horizontalForm',
    'type'=>'horizontal',
	'htmlOptions'=>array('enctype' => 'multipart/form-data'),
)); ?>
     	<fieldset>
		<legend>
			<span class="required">*</span> Wajib Diisi.
		</legend>

	<?php echo $form->errorSummary($model,'Opps!!!', null,array('class'=>'alert alert-error span12')); ?>
        		
   <div class="control-group">		
			<div class="span4">

	<?php echo $form->textFieldRow($model,'judul',array('class'=>'span5','maxlength'=>255)); ?>

	<div class="row">
	<div class="control-group ">
	<label class="control-label required" for="Post_detail">
	Deskripsi
	<span class="required">*</span>
	</label>
	<div class="controls">
		<?php
	
	$this->widget('ext.niceditor.nicEditorWidget',array(
	"id"=>"fungsi",
    "model"=>$model,                // Data-Model
    "attribute"=>"description",        // Attribute in the Data-Model
    "defaultValue"=>'defaultValue text here',
    "config"=>array("maxHeight"=>"200px"),
    "width"=>"600px",       // Optional default to 100%
    "height"=>"150px",      // Optional default to 150px
	));
	
	?>
	</div>
	</div>
	<?php echo $form->error($model,'description'); ?>
	</div>

	<div class="row">
	<div class="control-group ">
	<label class="control-label required" for="Post_detail">
	Foto
	<span class="required">*</span>
	</label>
	<div class="controls">
		<?php $this->widget('CMultiFileUpload', array('name'=>'image', 'max'=>'1', 'remove'=>'Hapus')); ?>
                <div><?php echo $model->image; ?></div>
	</div>
	</div>
	
	</div>

                        </div>   
  </div>

	<div class="form-actions" style="text-align:center">
		<?php $this->widget('bootstrap.widgets.TbButton', array(
			'buttonType'=>'submit',
			'type'=>'primary',
                        'icon'=>'ok white',  
			'label'=>$model->isNewRecord ? 'Tambah' : 'Simpan',
		)); ?>
              <?php $this->widget('bootstrap.widgets.TbButton', array(
			'buttonType'=>'reset',
                        'icon'=>'remove',  
			'label'=>'Reset',
		)); ?>
	</div>
</fieldset>

<?php $this->endWidget(); ?>

</div>
